/**   
* @Title: ChooseDetailPopAlert.java 
* @Package com.esun.lottery.shiyixuanwu.alertviews 
* @Description: TODO(十一选五投注方式选择弹出Alert View) 
* @author Miko baoz@500wan.com   
* @date 2011-1-15 下午04:44:57  
*/
package com.esun.rabbit2.viewer.mainact.lotteryhallact.shiyixuanwu.rabbittrunk;

import com.esun.ui.R;
import com.esun.util.log.EDebug;

import android.content.Context;
import android.view.View;
import android.widget.Button;

/** 
 * @ClassName: ChooseDetailPopAlert 
 * @Description: TODO(十一选五投注方式选择弹出Alert View) 
 * @author Miko baoz@500wan.com
 * @date 2011-1-15 下午04:44:57 
 *  
 */
public class ChooseDetailPopAlert extends AlertFather implements View.OnClickListener{

    /** 
    * <p>Title: 构造函数</p> 
    * <p>Description: 执行父类构造函数</p> 
    * @param context  MainAtc
    */
    public ChooseDetailPopAlert(Context context,View view,Button tvStyle) {
        super(context,view,tvStyle);
        // TODO Auto-generated constructor stub
        EDebug.o(this,"Choose Style Init start !");
        super.init(buttonID, this, layou);
         EDebug.o(this,"Choose Style Init end !");
    }

    
    // button 所有的id
    private int[] buttonID = {
            R.id.shiyixuanwu_container_alert_detailList_cancel,
            R.id.shiyixuanwu_container_alert_detailList_free,
            R.id.shiyixuanwu_container_alert_detailList_headDirect,
            R.id.shiyixuanwu_container_alert_detailList_headGroup, };
    
    // Alert的Layoout
    private int layou = R.layout.shiyixuanwu_container_alert_detaillist;
    
     /** 
      * @Title: alerShow 
      * @Description: TODO(显示Alert) 
      * @return void  
      */
     public void alertShow(){
         
        super.alerShow();
         
     }
     
     
     
    /* (non-Javadoc)
     * @see android.view.View.OnClickListener#onClick(android.view.View)
     */
    @Override
    public void onClick(View v) {
        // TODO Auto-generated method stub
        
//        Integer[] styleDisabled = null;
//        ShiyixuanwuPlayStyle.getPlayStyle().setDetailTemp(((Button)v).getText().toString());
        switch (v.getId()) {

        case R.id.shiyixuanwu_container_alert_detailList_free:

//            ShiyixuanwuPlayStyle.getPlayStyle().resetAllButtons();
//            ((Button)v).getText();
            ShiyixuanwuPlayStyle.getPlayStyle().setDetail(1);
//            ShiyixuanwuPlayStyle.getPlayStyle().setDetailTemp(((Button)v).getText().toString());
//            ShiyixuanwuPlayStyle.getPlayStyle().setStyleBtnDisabled(1);
           
            
            super.alertCancel(false);
            break;

        case R.id.shiyixuanwu_container_alert_detailList_headDirect:

//            ShiyixuanwuPlayStyle.getPlayStyle().resetAllButtons();
            
            ShiyixuanwuPlayStyle.getPlayStyle().setDetail(2);
            
//            ShiyixuanwuPlayStyle.getPlayStyle().setStyleBtnDisabled(2);

            super.alertCancel(false);
            break;

        case R.id.shiyixuanwu_container_alert_detailList_headGroup:

//            ShiyixuanwuPlayStyle.getPlayStyle().resetAllButtons();
            
            ShiyixuanwuPlayStyle.getPlayStyle().setDetail(3);
            
//            ShiyixuanwuPlayStyle.getPlayStyle().setStyleBtnDisabled(3);

            super.alertCancel(false);
            break;
        
        case R.id.shiyixuanwu_container_alert_detailList_cancel:
            super.alertCancel(true);
            break;
        }
    }
}
